#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
using namespace std;

int pathNum(int a, int b)
{
    if (a == 0 || b == 0) return 1;
    return pathNum(a - 1, b) + pathNum(a, b - 1);
}

int main()
{
    int m, n;
    while (cin >> m >> n) {
        cout << pathNum(m, n);
    }
    return 0;
}